async function getOllamaModels() {
    try {
      const response = await fetch('http://localhost:11434/api/tags')
      if (!response.ok) {
        throw new Error(`HTTP error! status: ${response.status}`)
      }
      const data = await response.json()
      return data.models.map(model => model.name)
    } catch (error) {
      console.error('获取模型列表失败:', error)
      return []
    }
  }


export {getOllamaModels}